Skip to content

feat(cli): arctl run --inspector + working --watch for MCP#499

Merged
xytian315 merged 9 commits into
mainfrom
xytian315/arctl-run-mcp-inspector
May 21, 2026
Merged

feat(cli): arctl run --inspector + working --watch for MCP#499
xytian315 merged 9 commits into
mainfrom
xytian315/arctl-run-mcp-inspector

Conversation

@xytian315
Copy link
Copy Markdown
Collaborator

@xytian315 xytian315 commented May 15, 2026

Description

Makes arctl run --watch work for MCP servers, composes with --inspector, and adds a signpost on agent --watch.

  • --inspector launches MCP Inspector against the local MCP; retries until ready. Errors on agent projects.
  • --watch for MCP: fixes <no value> template render; names the container so restarts docker rm -f cleanly instead of leaking ports.
  • --watch --inspector composes — Inspector reconnects across container restarts.
  • arctl run <agent> --watch prints where the agent lives and how to open chat in another terminal (suppressed with --no-chat).
  • cmd.Context() plumbed through so Ctrl-C cancels the watch loop cleanly.

Change Type

/kind feature
/kind fix

Changelog

`arctl run --watch` now works for MCP servers, composes with `--inspector`, and prints a chat signpost for agents.

Additional Notes

Signed-off-by: Kristy Tian <kristy.tian@solo.io>
@xytian315 xytian315 marked this pull request as ready for review May 15, 2026 16:08
Copilot AI review requested due to automatic review settings May 15, 2026 16:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an --inspector flag to arctl run to optionally launch the MCP Inspector alongside an MCP server run, with strict flag/kind validation and test coverage.

Changes:

  • Added --inspector flag to arctl run, including symmetric validation with --no-chat based on project kind.
  • Implemented a small internal/cli/declarative/inspector helper to spawn npx @modelcontextprotocol/inspector.
  • Added unit tests for the new validation behavior and dry-run narration.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
internal/cli/declarative/run.go Adds the --inspector flag, validates flag applicability by framework type, and launches/kills the Inspector subprocess.
internal/cli/declarative/run_test.go Adds tests for --inspector/--no-chat kind validation and dry-run Inspector URL narration.
internal/cli/declarative/inspector/inspector.go Introduces a wrapper to start MCP Inspector via npx with test-injectable process creation/start.
internal/cli/declarative/inspector/inspector_test.go Tests argv construction and error propagation for Inspector launch.

Comment thread internal/cli/declarative/run.go Outdated
Comment thread internal/cli/declarative/run.go Outdated
Comment thread internal/cli/declarative/run.go Outdated
Comment thread internal/cli/declarative/run.go Outdated
@xytian315 xytian315 changed the title feat: add --inspector flag to arctl run feat(cli): arctl run --inspector + working --watch for MCP May 19, 2026
@xytian315 xytian315 added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 746ec7d May 21, 2026
9 checks passed
@xytian315 xytian315 deleted the xytian315/arctl-run-mcp-inspector branch May 21, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants